package com.zoe.app.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author Zoe.Zhang
 * @date 2021/10/24
 * @description
 */
@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(IdempotentException.class)
    public String idempotentException(IdempotentException idempotentException) {
        return idempotentException.getMessage();
    }
}
